package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RobotPackageExperienceMapper;
import com.ruoyi.system.domain.RobotPackageExperience;
import com.ruoyi.system.service.IRobotPackageExperienceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 机器人套餐体验Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-02
 */
@Service
public class RobotPackageExperienceServiceImpl implements IRobotPackageExperienceService {
    @Autowired
    private RobotPackageExperienceMapper robotPackageExperienceMapper;

    /**
     * 查询机器人套餐体验
     *
     * @param packageExperienceId 机器人套餐体验主键
     * @return 机器人套餐体验
     */
    @Override
    public RobotPackageExperience selectRobotPackageExperienceByPackageExperienceId(Long packageExperienceId) {
        return robotPackageExperienceMapper.selectRobotPackageExperienceByPackageExperienceId(packageExperienceId);
    }

    /**
     * 查询机器人套餐体验列表
     *
     * @param robotPackageExperience 机器人套餐体验
     * @return 机器人套餐体验
     */
    @Override
    public List<RobotPackageExperience> selectRobotPackageExperienceList(RobotPackageExperience robotPackageExperience) {
        return robotPackageExperienceMapper.selectRobotPackageExperienceList(robotPackageExperience);
    }

    /**
     * 新增机器人套餐体验
     *
     * @param robotPackageExperience 机器人套餐体验
     * @return 结果
     */
    @Override
    public int insertRobotPackageExperience(RobotPackageExperience robotPackageExperience) {
        robotPackageExperience.setCreateTime(DateUtils.getNowDate());
        return robotPackageExperienceMapper.insertRobotPackageExperience(robotPackageExperience);
    }

    /**
     * 修改机器人套餐体验
     *
     * @param robotPackageExperience 机器人套餐体验
     * @return 结果
     */
    @Override
    public int updateRobotPackageExperience(RobotPackageExperience robotPackageExperience) {
        robotPackageExperience.setUpdateTime(DateUtils.getNowDate());
        return robotPackageExperienceMapper.updateRobotPackageExperience(robotPackageExperience);
    }

    /**
     * 批量删除机器人套餐体验
     *
     * @param packageExperienceIds 需要删除的机器人套餐体验主键
     * @return 结果
     */
    @Override
    public int deleteRobotPackageExperienceByPackageExperienceIds(String packageExperienceIds) {
        return robotPackageExperienceMapper.deleteRobotPackageExperienceByPackageExperienceIds(Convert.toStrArray(packageExperienceIds));
    }

    /**
     * 删除机器人套餐体验信息
     *
     * @param packageExperienceId 机器人套餐体验主键
     * @return 结果
     */
    @Override
    public int deleteRobotPackageExperienceByPackageExperienceId(Long packageExperienceId) {
        return robotPackageExperienceMapper.deleteRobotPackageExperienceByPackageExperienceId(packageExperienceId);
    }
}
